<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>二手交易平台管理系统</title>
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Moment.js -->
    <script src="https://cdn.jsdelivr.net/npm/moment@2.29.4/moment.min.js"></script>
    <!-- Axios -->
    <script src="https://cdn.jsdelivr.net/npm/axios@1.4.0/dist/axios.min.js"></script>
    <!-- 公共样式 -->
    <link rel="stylesheet" href="css/common.css">
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
    <div class="container">
        <a class="navbar-brand" href="#">二手交易平台管理系统</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav me-auto">
                <li class="nav-item">
                    <a class="nav-link" href="javascript:loadPage('pages/user.html')">用户管理</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="javascript:loadPage('pages/category.html')">商品分类</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="javascript:loadPage('pages/product.html')">商品管理</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="javascript:loadPage('pages/order.html')">订单管理</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="javascript:loadPage('pages/city.html')">城市管理</a>
                </li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
                        优惠券管理
                    </a>
                    <ul class="dropdown-menu">
                        <li><a class="dropdown-item" href="javascript:loadPage('pages/coupon-template.html')">优惠券模板</a></li>
                        <li><a class="dropdown-item" href="javascript:loadPage('pages/user-coupon.html')">用户优惠券</a></li>
                        <li><a class="dropdown-item" href="javascript:loadPage('pages/coupon-task.html')">发放任务</a></li>
                        <li><a class="dropdown-item" href="javascript:loadPage('pages/coupon-task-fail.html')">发放失败记录</a></li>
                        <li><a class="dropdown-item" href="javascript:loadPage('pages/coupon-template-log.html')">模板操作日志</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>

<!-- 内容区域（iframe加载子页面） -->
<div class="container">
    <iframe id="content-iframe" src="pages/user.html" frameborder="0" width="100%" height="800px"></iframe>
</div>

<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- 公共JS -->
<script src="js/common.js"></script>
<script>
    // 加载子页面
    function loadPage(pageUrl) {
        document.getElementById("content-iframe").src = pageUrl;
    }
</script>
</body>
</html>